//
//  ViewController.m
//  ImagePicker
//
//  Created by Jamin on 2018/10/15.
//  Copyright © 2018 jamin. All rights reserved.
//

#import "ViewController.h"

#import "JMImagePickerViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(100.0, 100.0, 100.0, 30.0);
    btn.backgroundColor = [UIColor blueColor];
    
    [btn addTarget:self action:@selector(goImagePicker:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
}


- (void)goImagePicker:(id)sender {
    JMImagePickerViewController *imgP = [JMImagePickerViewController defImagePickerViewController];
    [self presentViewController:imgP animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
